package com.etime.shuhuiyuan.services.coursechapter.interfaces;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.etime.shuhuiyuan.pojo.CourseChapter;
import io.swagger.models.auth.In;

import java.util.List;

/**
 * service层接口
 */
public interface CourseChapterService {
    /**
     * 增加课程章节
     * @param courseChapter
     * @return
     */
    int insertCourseChapter(CourseChapter courseChapter);

    /**
     * 修改课程章节
     * @param courseChapter
     * @return
     */
    int updateCourseChapter(CourseChapter courseChapter);

    /**
     * 查询课程章节
     * @param courseChapter
     * @return
     */
    List<CourseChapter> selectCourseChapterList(CourseChapter courseChapter);


    Page<CourseChapter> selectCourseChapterByPage(CourseChapter courseChapter, long pagenum, long pagesize);

    /**
     * 根据chapterid查询课程章节
     * @param chapterid
     * @return
     */
    CourseChapter selectCourseChapterById(Integer chapterid);

    Page<CourseChapter> selectCourseChapterListByPage(CourseChapter courseChapter,long pagenum, long pagesize);

    Page<CourseChapter> selectCourseKnotListByPage(CourseChapter courseChapter,long pagenum, long pagesize);
    Page<CourseChapter> selectCourseKnotListByPage2(CourseChapter courseChapter, long pagenum, long pagesize, Integer pid);

    //节点的新增
    /**
     * 增加课程节点
     * @param courseChapter
     * @return
     */
    int insertCourseKnot(CourseChapter courseChapter);

    /**
     * 修改课程节点
     * @param courseChapter
     * @return
     */
    int updateCourseKnot(CourseChapter courseChapter);
    /**
     * 根据chapterid查询课程节点
     * @param chapterid
     * @return
     */
    CourseChapter selectCourseKnotById(Integer chapterid);

    List<CourseChapter> selectChapterByCourseId(CourseChapter courseChapter,Integer courseid);
}
